<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button id="btn">你是否想剁手</button>
    <script>
        var btn = document.getElementById("btn");
        btn.onclick = function(){
            var value = window.confirm("你确定要剁手吗");
            //表现形式为弹窗，选择确定或取消，返回boolean值
            
            if(value){
                window.location.href = "https://www.taobao.com"
            }
            else{
                window.location.href = "http://www.hudazx.cn"
            }
        }
    </script>
</body>
</html>